<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" href="jQuery/jquery-ui.min.css"/>
</head>
<body>
<label>Tags</label>
<input type="text" id="text"/>
</body>
<script src="jQuery/jquery.js"></script>
<script src="jQuery/jquery-ui.min.js"></script>
<script>
    $(document).ready(function (){
        var tags=["mm","difei","fefe","dfef","fefeof"];
        $("#text").autocomplete({
            source:tags     //自动去查询数据库中的内容是否包含输入的字段
        });
    });
</script>
</html>